/*
 * dataset.h
 *
 *  Created on: Jun 1, 2011
 *      Author: tqlong
 */

#ifndef DATASET_H_
#define DATASET_H_

#include <vector>
#include <armadillo>

typedef arma::vec vec;
typedef std::vector<vec> vvec_type;

class Dataset : public vvec_type
{
  int n_, d_;
public:
  enum RAND_TYPE { RANDU = 0, RANDN};
  typedef vec vec_type;
public:
  void load(const std::string& fName);
  void save(const std::string& fName);
  void generate(int n, int dim, int type, const vec& p1, const vec& p2);
  inline int n() const { return n_; }
  inline int dim() const { return d_; }
  inline const vec& get(int i) { return this->at(i); }
};

#endif /* DATASET_H_ */
